﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NHibernate.Mappings;
using System.Xml.Serialization;

namespace Apollo
{
    [Serializable]
    [NHibernateEntity(Table = "apl_BulkImports")]
    public class BulkImport
    {
        public BulkImport() { }

        [PrimaryKey]
        public virtual int Id { get; set; }

        [Property]
        public virtual string Name { get; set; }

        [Property]
        public virtual DateTime ImportDate { get; set; }

        [Property]
        public virtual string ImportBy { get; set; }

        [Property]
        public virtual string FailureReason { get; set; }

        [Property]
        public virtual string FilePath { get; set; }

        [XmlIgnore]
        [BelongsTo(Column = "ID_Entity")]
        public virtual Entity Entity { get; set; }

        [Property]
        public virtual BulkImportState State { get; set; }
    }

    public enum BulkImportState { 
        Pending = 0,
        InProgress = 2,
        Done = 3,
        Failed = 4
    }
}
